﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:es="clr-namespace:Microsoft.Expression.Shapes;assembly=Microsoft.Expression.Drawing" 
    x:Class="ColorPatterns.MainPage"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="Congratulations">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="smiley">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.144"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1.643"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="smiley">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.067"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1.551"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="smiley">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="smiley">
				<EasingDoubleKeyFrame KeyTime="0" Value="-1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="-1.5"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="smiley">
				<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:3.5" Value="360.006"/>
				<EasingDoubleKeyFrame KeyTime="0:0:5" Value="-0.539"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Style="{StaticResource PhoneTextNormalStyle}"><TextBlock.Foreground>
            		<RadialGradientBrush>
            			<GradientStop Color="#FFFF4C00"/>
            			<GradientStop Color="#FFC9FF00" Offset="1"/>
            		</RadialGradientBrush>
            	</TextBlock.Foreground><Run Text="Tap on the squares to complet"/><Run Text="e"/><Run Text=" the color pattern"/></TextBlock>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,-8,12,8">
        	<Ellipse x:Name="circle15" Fill="#FF0D0101" Stroke="#FFEAEEF4" Margin="162,0,0,108" StrokeThickness="2" Height="43" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="44" Tap="circle_Tap" />
        	<Ellipse x:Name="circle14" Fill="#FF0D0101" Stroke="#FFEAEEF4" Margin="0,0,179,122" StrokeThickness="2" Height="43" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="44" Tap="circle_Tap" />
        	<TextBlock HorizontalAlignment="Right" Height="32" Margin="0,0,189,131" TextWrapping="Wrap" Text="?" VerticalAlignment="Bottom" Width="23" FontSize="26.667" TextAlignment="Center" Name="questionMark14" />
        	<TextBlock HorizontalAlignment="Left" Height="32" Margin="172,0,0,117" TextWrapping="Wrap" Text="?" VerticalAlignment="Bottom" Width="23" FontSize="26.667" TextAlignment="Center" Name="questionMark15" />
        	<Ellipse x:Name="circle11" Fill="#FF0D0101" HorizontalAlignment="Right" Stroke="#FFEAEEF4" Width="44" Margin="0,0,179,270" StrokeThickness="2" RenderTransformOrigin="0.477,0.535" Height="43" VerticalAlignment="Bottom" Tap="circle_Tap" />
        	<TextBlock HorizontalAlignment="Right" Height="32" Margin="0,0,142,239" TextWrapping="Wrap" Text="?" VerticalAlignment="Bottom" Width="23" FontSize="26.667" TextAlignment="Center" RenderTransformOrigin="0.565,0.562" />
        	<Ellipse Fill="#FF0D0101" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Top" Margin="162,205,0,0" StrokeThickness="2" x:Name="circle5" HorizontalAlignment="Left" Width="44" />
        	<Ellipse Fill="#FF0D0101" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Top" Margin="0,39,179,0" StrokeThickness="2" x:Name="circle1" HorizontalAlignment="Right" Width="44" />
        	<Ellipse x:Name="circle2" Fill="#FF0D0101" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Top" Margin="0,85,126,0" StrokeThickness="2" RenderTransformOrigin="1.136,0.465" HorizontalAlignment="Right" Width="44"/>
        	<Ellipse Fill="#FF0D0101" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Top" Margin="91,218,0,0" StrokeThickness="2" HorizontalAlignment="Left" Width="44" x:Name="circle6" />
        	<Ellipse Fill="#FF0D0101" HorizontalAlignment="Right" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Top" Width="44" Margin="0,151,126,0" StrokeThickness="2" x:Name="circle3" />
        	<Ellipse Fill="#FF0D0101" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Top" Margin="0,191,179,0" StrokeThickness="2" RenderTransformOrigin="5.045,4.465" x:Name="circle4" HorizontalAlignment="Right" Width="44" />
        	<Ellipse x:Name="circle13" Fill="#FF0D0101" Stroke="#FFEAEEF4" Margin="0,0,126,158" StrokeThickness="2" RenderTransformOrigin="2.341,7.209" Height="43" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="44" Tap="circle_Tap" />
        	<Ellipse Fill="#FF0D0101" HorizontalAlignment="Left" Stroke="#FFEAEEF4" Width="44" Margin="162,30,0,0" StrokeThickness="2" Height="43" VerticalAlignment="Top" x:Name="circle0" />
        	<Ellipse Fill="#FF0D0101" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Bottom" Margin="162,0,0,286" StrokeThickness="2" x:Name="circle10" HorizontalAlignment="Left" Width="44" />
        	<Ellipse Fill="#FF0D0101" Height="43" Stroke="#FFEAEEF4" VerticalAlignment="Bottom" Margin="91,0,0,298" StrokeThickness="2" HorizontalAlignment="Left" Width="44" x:Name="circle9" />
        	<Ellipse Fill="#FF0D0101" HorizontalAlignment="Left" Stroke="#FFEAEEF4" Width="44" Margin="30,256,0,0" StrokeThickness="2" Height="43" VerticalAlignment="Top" x:Name="circle7" />
        	<Ellipse Fill="#FF0D0101" HorizontalAlignment="Left" Stroke="#FFEAEEF4" Width="44" Margin="30,324,0,329" StrokeThickness="2" RenderTransformOrigin="5.727,5.93" x:Name="circle8" />
        	<Ellipse Fill="#FF0D0101" Stroke="#FFEAEEF4" Margin="0,0,126,226" StrokeThickness="2" Height="43" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="44" x:Name="circle12" Tap="circle_Tap" />
        	<Rectangle Fill="#FFE0220B" HorizontalAlignment="Right" Height="43" Margin="0,20,29,0" Stroke="#FF868B72" VerticalAlignment="Top" Width="52" x:Name="color0" Tap="color_Tap" RenderTransformOrigin="0.5,0.5" >
        		<Rectangle.RenderTransform>
        			<CompositeTransform/>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        	<Rectangle Fill="#FFE4EE0D" HorizontalAlignment="Right" Height="43" Margin="0,85,29,0" Stroke="#FF868B72" VerticalAlignment="Top" Width="52" x:Name="color1" Tap="color_Tap" />
        	<Rectangle Fill="#FF250B8E" HorizontalAlignment="Right" Height="43" Margin="0,151,29,0" Stroke="#FF868B72" VerticalAlignment="Top" Width="52" x:Name="color2" Tap="color_Tap" />
        	<Rectangle Fill="#FF0AB10A" HorizontalAlignment="Right" Height="43" Margin="0,216,29,0" Stroke="#FF868B72" VerticalAlignment="Top" Width="52" x:Name="color3" Tap="color_Tap" />
        	<Rectangle Fill="#FFF00DC6" HorizontalAlignment="Right" Margin="0,282,29,0" Stroke="#FF868B72" Width="52" Height="43" VerticalAlignment="Top" x:Name="color4" Tap="color_Tap" />
        	<Rectangle Fill="#FF00AEFF" HorizontalAlignment="Right" Margin="0,0,29,304" Stroke="#FF868B72" Width="52" Height="43" VerticalAlignment="Bottom" x:Name="color5" Tap="color_Tap" />
        	<Rectangle Fill="#FF674016" HorizontalAlignment="Right" Height="43" Margin="0,0,29,239" Stroke="#FF868B72" VerticalAlignment="Bottom" Width="52" x:Name="color6" Tap="color_Tap" />
        	<Rectangle Fill="#FFE3F0F0" HorizontalAlignment="Right" Height="43" Margin="0,0,29,174" Stroke="#FF868B72" VerticalAlignment="Bottom" Width="52" x:Name="color7" Tap="color_Tap" />
        	<Rectangle Fill="#FFFFA406" HorizontalAlignment="Right" Height="43" Margin="0,0,29,108" Stroke="#FF868B72" VerticalAlignment="Bottom" Width="52" x:Name="color8" Tap="color_Tap" />
        	<TextBlock HorizontalAlignment="Right" Height="32" Margin="0,0,189,279" TextWrapping="Wrap" Text="?" VerticalAlignment="Bottom" Width="23" FontSize="26.667" TextAlignment="Center" Name="questionMark11" />
        	<TextBlock Height="32" Margin="0,0,137,235" TextWrapping="Wrap" Text="?" VerticalAlignment="Bottom" FontSize="26.667" TextAlignment="Center" HorizontalAlignment="Right" Width="23" Name="questionMark12" />
        	<TextBlock HorizontalAlignment="Right" Height="32" Margin="0,0,137,167" TextWrapping="Wrap" Text="?" VerticalAlignment="Bottom" Width="23" FontSize="26.667" TextAlignment="Center" Name="questionMark13" />
        	<Image x:Name="smiley" Margin="119,230,157,286" Source="BigSmiley.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
        		<Image.RenderTransform>
        			<CompositeTransform/>
        		</Image.RenderTransform>
        	</Image>
        </Grid>
        <Button Content="New Pattern" Margin="142,0,140,19" Grid.Row="1" VerticalAlignment="Bottom" Name="newPattern" Click="newPattern_Click" />
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>